public class test1{
  public static void main(String args[]){
    int sum=0,fact=1,i;
   for(i=1;i<=3;i++){
   fact*=i;
   sum+=fact;
  }
 System.out.println("sum="+sum);
  }
}
